home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 November / Maximum CD 2000 Nov.iso / AofE-Conquerers / age2xtrial.exe / CABFILE / MSGAME.CAB / Data / gamedata_x1.drs / Unnamed File 000025.bina < prev    next >
Text File  |  2000-07-18  |  30KB  |  1,270 lines

  1. ;THE BULLY
  2. #load-if-not-defined TEAMS-LOCKED
  3. #load-if-defined DIFFICULTY-EASIEST
  4.  
  5.     (defrule
  6.         (true)
  7.     =>
  8.         (set-stance every-human neutral)
  9.         (set-stance every-computer neutral)
  10.         (disable-self)
  11.     )
  12.  
  13.     (defrule
  14.         (cc-players-building-type-count any-human market > 0)
  15.     =>
  16.         (generate-random-number 2)
  17.         (set-goal personality 50)
  18.         (disable-self)
  19.     )
  20.  
  21.     (defrule
  22.         (goal personality 50)
  23.         (random-number == 1)
  24.     =>
  25.         (disable-timer t-chat)
  26.         (enable-timer t-chat 10)
  27.         (set-goal personality 4)
  28.         (disable-self)
  29.     )
  30.  
  31.     (defrule
  32.         (goal personality 50)
  33.     =>
  34.         (set-goal personality 0)
  35.         (disable-self)
  36.     )
  37.  
  38.     (defrule
  39.         (goal personality 4)
  40.         (taunt-detected any-computer 218)
  41.     =>
  42.         (set-goal personality 0)
  43.         (acknowledge-taunt this-any-computer 218)
  44.         (disable-timer t-chat)
  45.         (disable-self)
  46.     )
  47.  
  48.     (defrule
  49.         (goal personality 4)
  50.         (timer-triggered t-chat)
  51.     =>
  52.         (set-goal personality ALLY)
  53.         (disable-timer t-chat)
  54.         (set-stance every-human neutral)
  55.         (set-stance every-computer neutral)
  56.         (chat-to-player-using-id every-human 22000)
  57.             ;"41 Send me 100 resources and I shall join thine side."
  58.         (chat-to-player-using-id every-computer 22400)    ;218
  59.         (disable-self)
  60.     )
  61.  
  62.     (defrule
  63.         (goal personality ALLY)
  64.         (or
  65.             (or
  66.                 (players-tribute any-human-neutral wood >= 100)
  67.                 (players-tribute any-human-neutral food >= 100)
  68.             )
  69.             (or
  70.                 (players-tribute any-human-neutral gold >= 100)
  71.                 (players-tribute any-human-neutral stone >= 100)
  72.             )
  73.         )
  74.     =>
  75.         (chat-to-player-using-id this-any-human-neutral 22002)
  76.         (chat-to-player-using-id this-any-human-neutral 22003)
  77.             ;"39 I am grateful for thy tribute."
  78.             ;"Let us be friends henceforth!"
  79.         (set-stance this-any-human-neutral ally)
  80.         (set-stance every-computer enemy)
  81.         (disable-self)
  82.     )
  83.  
  84. #end-if
  85. #load-if-defined DIFFICULTY-EASY
  86.     (defrule
  87.         (cc-players-building-type-count any-human market > 0)
  88.     =>
  89.         (generate-random-number 2)
  90.         (set-goal personality 50)
  91.         (disable-self)
  92.     )
  93.  
  94.     (defrule
  95.         (goal personality 50)
  96.         (random-number == 1)
  97.     =>
  98.         (disable-timer t-chat)
  99.         (enable-timer t-chat 10)
  100.         (set-goal personality 4)
  101.         (disable-self)
  102.     )
  103.  
  104.     (defrule
  105.         (goal personality 50)
  106.     =>
  107.         (set-goal personality 0)
  108.         (disable-self)
  109.     )
  110.  
  111.     (defrule
  112.         (goal personality 4)
  113.         (taunt-detected any-computer 218)
  114.     =>
  115.         (set-goal personality 0)
  116.         (acknowledge-taunt this-any-computer 218)
  117.         (disable-timer t-chat)
  118.         (disable-self)
  119.     )
  120.  
  121.     (defrule
  122.         (goal personality 4)
  123.         (timer-triggered t-chat)
  124.     =>
  125.         (set-goal personality ALLY)
  126.         (set-stance every-human neutral)
  127.         (set-stance every-computer neutral)
  128.         (chat-to-player-using-id every-computer 22400)    ;218
  129.         (disable-timer t-chat)
  130.         (enable-timer t-chat 600)
  131.         (disable-self)
  132.     )
  133.  
  134.     (defrule
  135.         (goal personality ALLY)
  136.         (starting-resources == low-resources)
  137.     =>
  138.         (chat-to-player-using-id every-human 22004)
  139.         (chat-to-player-using-id every-human 22005)
  140.             ;"41 Send me 200 each of wood, food, gold, and stone!"
  141.             ;"If thou dost this thing, I shall join thine side."
  142.         (disable-self)
  143.     )
  144.  
  145.     (defrule
  146.         (goal personality ALLY)
  147.         (starting-resources == medium-resources)
  148.     =>
  149.         (chat-to-player-using-id every-human 22006)
  150.         (chat-to-player-using-id every-human 22005)
  151.             ;"41 Send me 500 each of wood, food, gold, and stone!"
  152.             ;"If thou dost this thing, I shall join thine side."
  153.         (disable-self)
  154.     )
  155.  
  156.     (defrule
  157.         (goal personality ALLY)
  158.         (starting-resources == high-resources)
  159.         (stance-toward any-human neutral)
  160.     =>
  161.         (chat-to-player-using-id every-human 22007)
  162.         (chat-to-player-using-id every-human 22005)
  163.             ;"41 Send me 1000 each of wood, food, gold, and stone!"
  164.             ;"If thou dost this thing, I shall join thine side."
  165.         (disable-self)
  166.     )
  167.  
  168.     (defrule
  169.         (timer-triggered t-chat)
  170.         (goal personality ALLY)
  171.         (or
  172.             (and
  173.                 (starting-resources == low-resources)
  174.                 (players-tribute any-human-neutral wood < 200)
  175.             )
  176.             (or
  177.                 (and
  178.                     (starting-resources == medium-resources)
  179.                     (players-tribute any-human-neutral wood < 500)
  180.                 )
  181.                 (and
  182.                     (starting-resources == high-resources)
  183.                     (players-tribute any-human-neutral wood < 1000)
  184.                 )
  185.             )
  186.         )
  187.     =>
  188.         (chat-to-player-using-id this-any-human-neutral 22008)
  189.             ;"41 Thou must send me more wood!"
  190.         (disable-timer t-chat)
  191.         (enable-timer t-chat 300)
  192.     )
  193.  
  194.     (defrule
  195.         (timer-triggered t-chat)
  196.         (goal personality ALLY)
  197.         (or
  198.             (and
  199.                 (starting-resources == low-resources)
  200.                 (players-tribute any-human-neutral food < 200)
  201.             )
  202.             (or
  203.                 (and
  204.                     (starting-resources == medium-resources)
  205.                     (players-tribute any-human-neutral food < 500)
  206.                 )
  207.                 (and
  208.                     (starting-resources == high-resources)
  209.                     (players-tribute any-human-neutral food < 1000)
  210.                 )
  211.             )
  212.         )
  213.     =>
  214.         (chat-to-player-using-id this-any-human-neutral 22009)
  215.             ;"41 Thou must send me more food!"
  216.         (disable-timer t-chat)
  217.         (enable-timer t-chat 300)
  218.     )
  219.  
  220.     (defrule
  221.         (timer-triggered t-chat)
  222.         (goal personality ALLY)
  223.         (or
  224.             (and
  225.                 (starting-resources == low-resources)
  226.                 (players-tribute any-human-neutral gold < 200)
  227.             )
  228.             (or
  229.                 (and
  230.                     (starting-resources == medium-resources)
  231.                     (players-tribute any-human-neutral gold < 500)
  232.                 )
  233.                 (and
  234.                     (starting-resources == high-resources)
  235.                     (players-tribute any-human-neutral gold < 1000)
  236.                 )
  237.             )
  238.         )
  239.     =>
  240.         (chat-to-player-using-id this-any-human-neutral 22010)
  241.             ;"41 Thou must send me more gold!"
  242.         (disable-timer t-chat)
  243.         (enable-timer t-chat 300)
  244.     )
  245.  
  246.     (defrule
  247.         (timer-triggered t-chat)
  248.         (goal personality ALLY)
  249.         (or
  250.             (and
  251.                 (starting-resources == low-resources)
  252.                 (players-tribute any-human-neutral stone < 200)
  253.             )
  254.             (or
  255.                 (and
  256.                     (starting-resources == medium-resources)
  257.                     (players-tribute any-human-neutral stone < 500)
  258.                 )
  259.                 (and
  260.                     (starting-resources == high-resources)
  261.                     (players-tribute any-human-neutral stone < 1000)
  262.                 )
  263.             )
  264.         )
  265.     =>
  266.         (chat-to-player-using-id this-any-human-neutral 22011)
  267.             ;"41 Thou must send me more stone!"
  268.         (disable-timer t-chat)
  269.         (enable-timer t-chat 300)
  270.     )
  271.  
  272.     (defrule
  273.         (goal personality ALLY)
  274.         (or
  275.             (and
  276.                 (starting-resources == low-resources)
  277.                 (players-tribute any-human-neutral wood >= 200)
  278.             )
  279.             (or
  280.                 (and
  281.                     (starting-resources == medium-resources)
  282.                     (players-tribute any-human-neutral wood >= 500)
  283.                 )
  284.                 (and
  285.                     (starting-resources == high-resources)
  286.                     (players-tribute any-human-neutral wood >= 1000)
  287.                 )
  288.             )
  289.         )
  290.     =>
  291.         (chat-to-player-using-id this-any-human-neutral 22012)
  292.             ;"41 Thank thee for the wood! It is enough."
  293.         (disable-self)
  294.     )
  295.  
  296.     (defrule
  297.         (goal personality ALLY)
  298.         (or
  299.             (and
  300.                 (starting-resources == low-resources)
  301.                 (players-tribute any-human-neutral food >= 200)
  302.             )
  303.             (or
  304.                 (and
  305.                     (starting-resources == medium-resources)
  306.                     (players-tribute any-human-neutral food >= 500)
  307.                 )
  308.                 (and
  309.                     (starting-resources == high-resources)
  310.                     (players-tribute any-human-neutral food >= 1000)
  311.                 )
  312.             )
  313.         )
  314.     =>
  315.         (chat-to-player-using-id this-any-human-neutral 22013)
  316.             ;"41 Thank thee for the food! It is enough."
  317.         (disable-self)
  318.     )
  319.  
  320.     (defrule
  321.         (goal personality ALLY)
  322.         (or
  323.             (and
  324.                 (starting-resources == low-resources)
  325.                 (players-tribute any-human-neutral gold >= 200)
  326.             )
  327.             (or
  328.                 (and
  329.                     (starting-resources == medium-resources)
  330.                     (players-tribute any-human-neutral gold >= 500)
  331.                 )
  332.                 (and
  333.                     (starting-resources == high-resources)
  334.                     (players-tribute any-human-neutral gold >= 1000)
  335.                 )
  336.             )
  337.         )
  338.     =>
  339.         (chat-to-player-using-id this-any-human-neutral 22014)
  340.             ;"41 Thank thee for the gold! It is enough."
  341.         (disable-self)
  342.     )
  343.  
  344.     (defrule
  345.         (goal personality ALLY)
  346.         (or
  347.             (and
  348.                 (starting-resources == low-resources)
  349.                 (players-tribute any-human-neutral stone >= 200)
  350.             )
  351.             (or
  352.                 (and
  353.                     (starting-resources == medium-resources)
  354.                     (players-tribute any-human-neutral stone >= 500)
  355.                 )
  356.                 (and
  357.                     (starting-resources == high-resources)
  358.                     (players-tribute any-human-neutral stone >= 1000)
  359.                 )
  360.             )
  361.         )
  362.     =>
  363.         (chat-to-player-using-id this-any-human-neutral 22015)
  364.             ;"41 Thank thee for the stone! It is enough."
  365.         (disable-self)
  366.     )
  367.  
  368.     (defrule
  369.         (goal personality ALLY)
  370.         (starting-resources == low-resources)
  371.         (players-tribute any-human-neutral wood >= 200)
  372.         (players-tribute any-human-neutral food >= 200)
  373.         (players-tribute any-human-neutral gold >= 200)
  374.         (players-tribute any-human-neutral stone >= 200)
  375.     =>
  376.         (chat-to-player-using-id this-any-human-neutral 22016)
  377.         (chat-to-player-using-id this-any-human-neutral 22017)
  378.             ;"39 The goods we have obtained from thee are glorious!"
  379.             ;"Set thine stance to Ally with me!"
  380.         (set-stance this-any-human-neutral ally)
  381.         (set-goal 35 NOTICE)
  382.         (set-goal 22 NO)
  383.         (disable-self)
  384.     )
  385.  
  386.     (defrule
  387.         (goal personality ALLY)
  388.         (starting-resources == medium-resources)
  389.         (players-tribute any-human-neutral wood >= 500)
  390.         (players-tribute any-human-neutral food >= 500)
  391.         (players-tribute any-human-neutral gold >= 500)
  392.         (players-tribute any-human-neutral stone >= 500)
  393.     =>
  394.         (chat-to-player-using-id this-any-human-neutral 22016)
  395.         (chat-to-player-using-id this-any-human-neutral 22017)
  396.             ;"39 The goods we have obtained from thee are glorious!"
  397.             ;"Set thine stance to Ally with me!"
  398.         (set-stance this-any-human-neutral ally)
  399.         (set-goal 35 NOTICE)
  400.         (set-goal 22 NO)
  401.         (disable-self)
  402.     )
  403.  
  404.     (defrule
  405.         (goal personality ALLY)
  406.         (starting-resources == high-resources)
  407.         (players-tribute any-human-neutral wood >= 1000)
  408.         (players-tribute any-human-neutral food >= 1000)
  409.         (players-tribute any-human-neutral gold >= 1000)
  410.         (players-tribute any-human-neutral stone >= 1000)
  411.     =>
  412.         (chat-to-player-using-id this-any-human-neutral 22016)
  413.         (chat-to-player-using-id this-any-human-neutral 22017)
  414.             ;"39 The goods we have obtained from thee are glorious!"
  415.             ;"Set thine stance to Ally with me!"
  416.         (set-stance this-any-human-neutral ally)
  417.         (set-goal 35 NOTICE)
  418.         (set-goal 22 NO)
  419.         (disable-self)
  420.     )
  421.  
  422. #end-if
  423. #load-if-not-defined DIFFICULTY-EASIEST
  424. #load-if-not-defined DIFFICULTY-EASY
  425.  
  426.     (defrule
  427.         (true)
  428.     =>
  429.         (set-goal personality NOTICE)
  430.         (set-goal 22 NO)
  431.         (disable-self)
  432.     )
  433.  
  434.     (defrule
  435.         (goal personality NOTICE)
  436.         (taunt-detected any-computer-ally 218)
  437.     =>
  438.         (set-goal personality 12)
  439.         (set-stance every-human enemy)
  440.         (acknowledge-taunt this-any-computer-ally 218)
  441.         (set-stance every-computer ally)
  442.         (disable-self)
  443.     )
  444.  
  445.     (defrule
  446.         (goal personality NOTICE)
  447.         (difficulty <= moderate)
  448.         (or
  449.             (building-type-count house > 0)
  450.             (or
  451.                 (civ-selected hun)
  452.                 (building-type-count castle > 0)
  453.             )
  454.         )
  455.         (player-in-game any-computer-ally)
  456.     =>
  457.         (set-goal personality 50)
  458.         (disable-self)
  459.     )
  460.  
  461.     (defrule
  462.         (goal personality 50)
  463.     =>
  464.         (generate-random-number 4)
  465.         (set-goal 36 NO)
  466.         (set-goal 37 NO)
  467.         (set-goal 38 NO)
  468.         (set-goal 39 NO)
  469.         (disable-self)
  470.     )
  471.  
  472.     (defrule
  473.         (goal personality 50)
  474.         (random-number == 1)
  475.     =>
  476.         (set-goal personality ALLY)
  477.         (disable-self)
  478.     )
  479.  
  480.     (defrule
  481.         (goal personality 50)
  482.         (difficulty == moderate)
  483.         (or
  484.             (random-number == 2)
  485.             (random-number == 3)
  486.         )
  487.     =>
  488.         (set-goal personality ALLY)
  489.         (disable-self)
  490.     )
  491.  
  492.     (defrule
  493.         (goal personality 50)
  494.         (difficulty < moderate)
  495.         (or
  496.             (random-number == 2)
  497.             (random-number == 3)
  498.         )
  499.     =>
  500.         (set-goal personality BULLY)
  501.         (disable-self)
  502.     )
  503.  
  504.     (defrule
  505.         (goal personality 50)
  506.         (random-number == 4)
  507.     =>
  508.         (set-goal personality BULLY)
  509.         (disable-self)
  510.     )
  511.  
  512.     ;make sure the other AIs don't try this!
  513.     (defrule
  514.         (or
  515.             (goal personality BULLY)
  516.             (goal personality ALLY)
  517.         )
  518.     =>
  519.         (chat-to-player-using-id every-computer 22400)    ;"218"
  520.         (disable-self)
  521.     )
  522.  
  523.     ;no early rush!
  524.     (defrule
  525.         (or
  526.             (goal personality BULLY)
  527.             (goal personality ALLY)
  528.         )
  529.         (or
  530.             (goal rush-control 2)
  531.             (goal rush-control RUSHING)
  532.         )
  533.     =>
  534.         (set-goal rush-control IMPERIAL)
  535.     )
  536.  
  537. ;end the deal
  538. (defrule
  539.     (stance-toward any-human enemy)
  540.     (or
  541.         (goal personality BULLY)
  542.         (goal personality ALLY)
  543.     )
  544. =>
  545.     (set-stance this-any-human neutral)
  546.     (set-stance every-computer neutral)
  547.     (disable-self)
  548. )
  549.  
  550. ;*******************************************************8
  551. ;bully rules
  552.  
  553. (defrule
  554.     (goal personality BULLY)
  555.     (goal get-mad NO)
  556.     (current-age >= feudal-age)
  557. =>
  558.     (disable-timer t-chat)
  559.     (enable-timer t-chat 300)
  560.     (set-goal 25 NOTICE)
  561.     (disable-self)
  562. )
  563.  
  564. (defrule
  565.     (goal personality BULLY)
  566.     (goal 25 NOTICE)
  567.     (timer-triggered t-chat)
  568. =>
  569.     (generate-random-number 4)
  570. )
  571.  
  572. ;***************************************************
  573. ;feudal age demands
  574. (defrule
  575.     (goal personality BULLY)
  576.     (goal 25 NOTICE)
  577.     (current-age == feudal-age)
  578.     (timer-triggered t-chat)
  579.     (stance-toward any-human neutral)
  580.     (random-number == 1)
  581. =>
  582.     (chat-to-player-using-id this-any-human 22039)
  583.         ;"41 Give me 100 wood or face my wrath! Thou hast but 3 minutes to obey!"
  584.     (set-goal 25 WOOD)
  585.     (clear-tribute-memory this-any-human wood)
  586.     (disable-timer t-chat)
  587.     (enable-timer t-chat 200)
  588. )
  589.  
  590. (defrule
  591.     (goal personality BULLY)
  592.     (goal 25 NOTICE)
  593.     (current-age == feudal-age)
  594.     (timer-triggered t-chat)
  595.     (stance-toward any-human neutral)
  596.     (random-number == 2)
  597. =>
  598.     (chat-to-player-using-id this-any-human 22038)
  599.         ;"41 Give me 100 food or face my wrath! Thou hast but 3 minutes to obey!"
  600.     (set-goal 25 FOOD)
  601.     (clear-tribute-memory this-any-human food)
  602.     (disable-timer t-chat)
  603.     (enable-timer t-chat 200)
  604. )
  605.  
  606. (defrule
  607.     (goal personality BULLY)
  608.     (goal 25 NOTICE)
  609.     (current-age == feudal-age)
  610.     (timer-triggered t-chat)
  611.     (stance-toward any-human neutral)
  612.     (random-number == 3)
  613. =>
  614.     (chat-to-player-using-id this-any-human 22036)
  615.         ;"41 Give me 100 gold or face my wrath! Thou hast but 3 minutes to obey!"
  616.     (set-goal 25 GOLD)
  617.     (clear-tribute-memory this-any-human gold)
  618.     (disable-timer t-chat)
  619.     (enable-timer t-chat 200)
  620. )
  621.  
  622. (defrule
  623.     (goal personality BULLY)
  624.     (goal 25 NOTICE)
  625.     (current-age == feudal-age)
  626.     (timer-triggered t-chat)
  627.     (stance-toward any-human neutral)
  628.     (random-number == 4)
  629. =>
  630.     (chat-to-player-using-id this-any-human 22040)
  631.         ;"Give me 100 stone or face my wrath! Thou hast but 3 minutes to obey!"
  632.     (set-goal 25 STONE)
  633.     (clear-tribute-memory this-any-human stone)
  634.     (disable-timer t-chat)
  635.     (enable-timer t-chat 200)
  636. )
  637.  
  638. (defrule
  639.     (goal personality BULLY)
  640.     (or
  641.         (and
  642.             (goal 25 WOOD)
  643.             (players-tribute-memory any-human-neutral wood >= 100)
  644.         )
  645.         (and
  646.             (goal 25 FOOD)
  647.             (players-tribute-memory any-human-neutral food >= 100)
  648.         )
  649.     )
  650. =>
  651.     (chat-to-player-using-id this-any-human-neutral 22041)
  652.         ;"41 Well done! Thou art still in my good graces."
  653.     (set-goal 25 NOTICE)
  654.     (disable-timer t-chat)
  655.     (enable-timer t-chat 360)
  656. )
  657.  
  658. (defrule
  659.     (goal personality BULLY)
  660.     (or
  661.         (and
  662.             (goal 25 GOLD)
  663.             (players-tribute-memory any-human-neutral gold >= 100)
  664.         )
  665.         (and
  666.             (goal 25 STONE)
  667.             (players-tribute-memory any-human-neutral stone >= 100)
  668.         )
  669.     )
  670. =>
  671.     (chat-to-player-using-id this-any-human-neutral 22041)
  672.         ;"41 Well done! Thou art still in my good graces."
  673.     (set-goal 25 NOTICE)
  674.     (disable-timer t-chat)
  675.     (enable-timer t-chat 360)
  676. )
  677.  
  678. (defrule
  679.     (goal personality BULLY)
  680.     (timer-triggered t-chat)
  681.     (or
  682.         (or
  683.             (goal 25 WOOD)
  684.             (goal 25 FOOD)
  685.         )
  686.         (or
  687.             (goal 25 GOLD)
  688.             (goal 25 STONE)
  689.         )
  690.     )
  691. =>
  692.     (set-goal personality 10)
  693.     (disable-timer t-chat)
  694.     (disable-self)
  695. )
  696.  
  697. ;***************************************************
  698. ;castle-age demands
  699. (defrule
  700.     (goal personality BULLY)
  701.     (goal 25 NOTICE)
  702.     (timer-triggered t-chat)
  703.     (current-age == castle-age)
  704.     (stance-toward any-human neutral)
  705.     (random-number == 1)
  706. =>
  707.     (chat-to-player-using-id this-any-human 22045)
  708.         ;"41 Thou hast but 2 minutes to send me 200 wood or face the consequences!"
  709.     (set-goal 25 CASTLE-AGE-WOOD)
  710.     (clear-tribute-memory this-any-human wood)
  711.     (disable-timer t-chat)
  712.     (enable-timer t-chat 150)
  713. )
  714.  
  715. (defrule
  716.     (goal personality BULLY)
  717.     (goal 25 NOTICE)
  718.     (timer-triggered t-chat)
  719.     (current-age == castle-age)
  720.     (stance-toward any-human neutral)
  721.     (random-number == 2)
  722. =>
  723.     (chat-to-player-using-id this-any-human 22043)
  724.         ;"41 Thou hast but 2 minutes to send me 200 food or face the consequences!"
  725.     (set-goal 25 CASTLE-AGE-FOOD)
  726.     (clear-tribute-memory this-any-human food)
  727.     (disable-timer t-chat)
  728.     (enable-timer t-chat 150)
  729. )
  730.  
  731. (defrule
  732.     (goal personality BULLY)
  733.     (goal 25 NOTICE)
  734.     (timer-triggered t-chat)
  735.     (current-age == castle-age)
  736.     (stance-toward any-human neutral)
  737.     (random-number == 3)
  738. =>
  739.     (chat-to-player-using-id this-any-human 22042)
  740.         ;"41 Thou hast but 2 minutes to send me 200 gold or face the consequences!"
  741.     (set-goal 25 CASTLE-AGE-GOLD)
  742.     (clear-tribute-memory this-any-human gold)
  743.     (disable-timer t-chat)
  744.     (enable-timer t-chat 150)
  745. )
  746.  
  747. (defrule
  748.     (goal personality BULLY)
  749.     (goal 25 NOTICE)
  750.     (timer-triggered t-chat)
  751.     (current-age == castle-age)
  752.     (stance-toward any-human neutral)
  753.     (random-number == 3)
  754. =>
  755.     (chat-to-player-using-id this-any-human 22044)
  756.         ;"41 Thou hast but 2 minutes to send me 200 stone or face the consequences!"
  757.     (set-goal 25 CASTLE-AGE-STONE)
  758.     (clear-tribute-memory this-any-human stone)
  759.     (disable-timer t-chat)
  760.     (enable-timer t-chat 150)
  761. )
  762.  
  763. (defrule
  764.     (goal personality BULLY)
  765.     (or
  766.         (and
  767.             (goal 25 CASTLE-AGE-WOOD)
  768.             (players-tribute-memory any-human-neutral wood >= 200)
  769.         )
  770.         (and
  771.             (goal 25 CASTLE-AGE-FOOD)
  772.             (players-tribute-memory any-human-neutral food >= 200)
  773.         )
  774.     )
  775. =>
  776.     (chat-to-player-using-id this-any-human-neutral 22046)
  777.         ;"41 Thank thee! Thy tribute shall be put to good use."
  778.     (set-goal 25 NOTICE)
  779.     (disable-timer t-chat)
  780.     (enable-timer t-chat 360)
  781. )
  782.  
  783. (defrule
  784.     (goal personality BULLY)
  785.     (or
  786.         (and
  787.             (goal 25 CASTLE-AGE-GOLD)
  788.             (players-tribute-memory any-human-neutral gold >= 200)
  789.         )
  790.         (and
  791.             (goal 25 CASTLE-AGE-STONE)
  792.             (players-tribute-memory any-human-neutral stone >= 200)
  793.         )
  794.     )
  795. =>
  796.     (chat-to-player-using-id this-any-human-neutral 22046)
  797.         ;"41 Thank thee! Thy tribute shall be put to good use."
  798.     (set-goal 25 NOTICE)
  799.     (disable-timer t-chat)
  800.     (enable-timer t-chat 360)
  801. )
  802.  
  803. (defrule
  804.     (goal personality BULLY)
  805.     (timer-triggered t-chat)
  806.     (or
  807.         (or
  808.             (goal 25 CASTLE-AGE-WOOD)
  809.             (goal 25 CASTLE-AGE-FOOD)
  810.         )
  811.         (or
  812.             (goal 25 CASTLE-AGE-GOLD)
  813.             (goal 25 CASTLE-AGE-STONE)
  814.         )
  815.     )
  816. =>
  817.     (set-goal personality 10)
  818.     (disable-timer t-chat)
  819.     (disable-self)
  820. )
  821. ;***************************************************
  822. ;Imperial age demands
  823. (defrule
  824.     (timer-triggered t-chat)
  825.     (goal personality BULLY)
  826.     (current-age == imperial-age)
  827.     (stance-toward any-human neutral)
  828.     (random-number == 1)
  829. =>
  830.     (chat-to-player-using-id this-any-human 22047)
  831.         ;"41 Send me 500 wood in tribute or die! As usual, thou hast 2 minutes to comply."
  832.     (set-goal 25 IMPERIAL-AGE-WOOD)
  833.     (clear-tribute-memory this-any-human wood)
  834.     (disable-timer t-chat)
  835.     (enable-timer t-chat 150)
  836. )
  837.  
  838. (defrule
  839.     (timer-triggered t-chat)
  840.     (goal personality BULLY)
  841.     (current-age == imperial-age)
  842.     (stance-toward any-human neutral)
  843.     (random-number == 2)
  844. =>
  845.     (chat-to-player-using-id this-any-human 22048)
  846.         ;"41 Send me 500 food in tribute or die! As usual, thou hast 2 minutes to comply."
  847.     (set-goal 25 IMPERIAL-AGE-FOOD)
  848.     (clear-tribute-memory this-any-human food)
  849.     (disable-timer t-chat)
  850.     (enable-timer t-chat 150)
  851. )
  852.  
  853. (defrule
  854.     (timer-triggered t-chat)
  855.     (goal personality BULLY)
  856.     (current-age == imperial-age)
  857.     (stance-toward any-human neutral)
  858.     (random-number == 3)
  859. =>
  860.     (chat-to-player-using-id this-any-human 22049)
  861.         ;"41 Send me 500 gold in tribute or die! As usual, thou hast 2 minutes to comply."
  862.     (set-goal 25 IMPERIAL-AGE-GOLD)
  863.     (clear-tribute-memory this-any-human gold)
  864.     (disable-timer t-chat)
  865.     (enable-timer t-chat 150)
  866. )
  867.  
  868. (defrule
  869.     (timer-triggered t-chat)
  870.     (goal personality BULLY)
  871.     (current-age == imperial-age)
  872.     (stance-toward any-human neutral)
  873.     (random-number == 4)
  874. =>
  875.     (chat-to-player-using-id this-any-human 22051)
  876.         ;"41 Send me 500 stone in tribute or die! As usual, thou hast 2 minutes to comply."
  877.     (set-goal 25 IMPERIAL-AGE-STONE)
  878.     (clear-tribute-memory this-any-human stone)
  879.     (disable-timer t-chat)
  880.     (enable-timer t-chat 150)
  881. )
  882.  
  883. (defrule
  884.     (goal personality BULLY)
  885.     (or
  886.         (and
  887.             (goal 25 IMPERIAL-AGE-WOOD)
  888.             (players-tribute-memory any-human-neutral wood >= 500)
  889.         )
  890.         (and
  891.             (goal 25 IMPERIAL-AGE-FOOD)
  892.             (players-tribute-memory any-human-neutral food >= 500)
  893.         )
  894.     )
  895. =>
  896.     (chat-to-player-using-id this-any-human-neutral 22052)
  897.         ;"41 Excellent! Thou hast done acceptably, and are safe for now."
  898.     (set-goal 25 NOTICE)
  899.     (disable-timer t-chat)
  900.     (enable-timer t-chat 360)
  901. )
  902.  
  903. (defrule
  904.     (goal personality BULLY)
  905.     (or
  906.         (and
  907.             (goal 25 IMPERIAL-AGE-GOLD)
  908.             (players-tribute-memory any-human-neutral gold >= 500)
  909.         )
  910.         (and
  911.             (goal 25 IMPERIAL-AGE-STONE)
  912.             (players-tribute-memory any-human-neutral stone >= 500)
  913.         )
  914.     )
  915. =>
  916.     (chat-to-player-using-id this-any-human-neutral 22052)
  917.         ;"41 Excellent! Thou hast done acceptably, and are safe for now."
  918.     (set-goal 25 NOTICE)
  919.     (disable-timer t-chat)
  920.     (enable-timer t-chat 360)
  921. )
  922.  
  923. (defrule
  924.     (goal personality BULLY)
  925.     (timer-triggered t-chat)
  926.     (or
  927.         (or
  928.             (goal 25 IMPERIAL-AGE-WOOD)
  929.             (goal 25 IMPERIAL-AGE-FOOD)
  930.         )
  931.         (or
  932.             (goal 25 IMPERIAL-AGE-GOLD)
  933.             (goal 25 IMPERIAL-AGE-STONE)
  934.         )
  935.     )
  936. =>
  937.     (set-goal personality 10)
  938.     (disable-timer t-chat)
  939.     (disable-self)
  940. )
  941.  
  942. ;lots and lots of tribute
  943. (defrule
  944.     (goal personality BULLY)
  945.     (players-tribute any-human-neutral wood > 500)
  946.     (players-tribute any-human-neutral food > 500)
  947.     (players-tribute any-human-neutral gold > 500)
  948.     (players-tribute any-human-neutral stone > 500)
  949. =>
  950.     (set-stance every-computer enemy)
  951.     (chat-to-player-using-id this-any-human-neutral 22053)
  952.         ;"39 Thou art a worthy fellow. I hereby declare us friends."
  953.     (set-goal personality NO)
  954.     (set-stance this-any-human-neutral ally)
  955.     (disable-self)
  956. )
  957.  
  958. (defrule
  959.     (goal personality BULLY)
  960.     (or
  961.         (or
  962.             (players-tribute any-human-neutral wood >= 1500)
  963.             (players-tribute any-human-neutral food >= 1500)
  964.         )
  965.         (or
  966.             (players-tribute any-human-neutral gold >= 1500)
  967.             (players-tribute any-human-neutral stone >= 1500)
  968.         )
  969.     )
  970. =>
  971.     (set-stance this-any-human-neutral ally)
  972.     (set-stance every-computer enemy)
  973.     (chat-to-player-using-id this-any-human-neutral 22053)
  974.         ;"39 Thou art a worthy fellow. I hereby declare us friends."
  975.     (set-goal personality NO)
  976.     (disable-timer t-chat)
  977.     (disable-self)
  978. )
  979.  
  980. ;********************************************
  981. ;********************************************
  982. ;THE ALLY RULES (goal personality ALLY)
  983.  
  984.     (defrule
  985.         (goal personality ALLY)
  986.         (goal get-mad NO)
  987.         (stance-toward any-human neutral)
  988.         (current-age == feudal-age)
  989.         (game-time > 600)
  990.     =>
  991.         (chat-to-player-using-id this-any-human 22055)
  992.         (chat-to-player-using-id this-any-human 22056)
  993.             ;"41 Send me 500 each of wood, food, gold, and stone!"
  994.             ;"If thou dost this thing, I shall join thine side."
  995.         (set-goal 22 YES)
  996.         (disable-self)
  997.     )
  998.  
  999.     (defrule
  1000.         (goal personality ALLY)
  1001.         (goal 22 YES)
  1002.         (starting-resources == low-resources)
  1003.     =>
  1004.         (enable-timer t-chat 600)
  1005.         (disable-self)
  1006.     )
  1007.  
  1008.     (defrule
  1009.         (goal personality ALLY)
  1010.         (goal 22 YES)
  1011.         (starting-resources == medium-resources)
  1012.     =>
  1013.         (enable-timer t-chat 300)
  1014.         (disable-self)
  1015.     )
  1016.  
  1017.     (defrule
  1018.         (goal personality ALLY)
  1019.         (goal 2 YES)
  1020.         (starting-resources == high-resources)
  1021.     =>
  1022.         (enable-timer t-chat 150)
  1023.         (disable-self)
  1024.     )
  1025.  
  1026.     (defrule
  1027.         (goal personality ALLY)
  1028.         (timer-triggered t-chat)
  1029.         (players-tribute any-human-neutral wood < 500)
  1030.     =>
  1031.         (chat-to-player-using-id this-any-human-neutral 22057)
  1032.             ;"41 Thou must send more wood if thou wishest me to be thine ally!"
  1033.         (disable-timer t-chat)
  1034.         (enable-timer t-chat 300)
  1035.     )
  1036.  
  1037.     (defrule
  1038.         (timer-triggered t-chat)
  1039.         (goal personality ALLY)
  1040.         (players-tribute any-human-neutral food < 500)
  1041.     =>
  1042.         (chat-to-player-using-id this-any-human-neutral 22058)
  1043.             ;"41 Thou must send more food if thou wishest me to be thine ally!"
  1044.         (disable-timer t-chat)
  1045.         (enable-timer t-chat 300)
  1046.     )
  1047.  
  1048.     (defrule
  1049.         (timer-triggered t-chat)
  1050.         (goal personality ALLY)
  1051.         (players-tribute any-human-neutral gold < 500)
  1052.     =>
  1053.         (chat-to-player-using-id this-any-human-neutral 22059)
  1054.             ;"41 Thou must send more gold if thou wishest me to be thine ally!"
  1055.         (disable-timer t-chat)
  1056.         (enable-timer t-chat 300)
  1057.     )
  1058.  
  1059.     (defrule
  1060.         (timer-triggered t-chat)
  1061.         (goal personality ALLY)
  1062.         (players-tribute any-human-neutral stone < 500)
  1063.     =>
  1064.         (chat-to-player-using-id this-any-human-neutral 22060)
  1065.             ;"41 Thou must send more stone if thou wishest me to be thine ally!"
  1066.         (disable-timer t-chat)
  1067.         (enable-timer t-chat 300)
  1068.         (disable-self)
  1069.     )
  1070.  
  1071.     (defrule
  1072.         (goal personality ALLY)
  1073.         (players-tribute any-human-neutral wood >= 500)
  1074.     =>
  1075.         (chat-to-player-using-id this-any-human-neutral 22061)
  1076.             ;"41 Thank thee for the wood! It is enough."
  1077.         (clear-tribute-memory this-any-human-neutral wood)
  1078.         (set-goal 36 YES)
  1079.         (disable-self)
  1080.     )
  1081.  
  1082.     (defrule
  1083.         (goal personality ALLY)
  1084.         (players-tribute any-human-neutral food >= 500)
  1085.     =>
  1086.         (chat-to-player-using-id this-any-human-neutral 22062)
  1087.             ;"41 Thank thee for the food! It is enough."
  1088.         (clear-tribute-memory this-any-human-neutral food)
  1089.         (set-goal 37 YES)
  1090.         (disable-self)
  1091.     )
  1092.  
  1093.     (defrule
  1094.         (goal personality ALLY)
  1095.         (players-tribute any-human-neutral gold >= 500)
  1096.     =>
  1097.         (chat-to-player-using-id this-any-human-neutral 22063)
  1098.             ;"41 Thank thee for the gold! It is enough."
  1099.         (clear-tribute-memory this-any-human-neutral gold)
  1100.         (disable-self)
  1101.     )
  1102.  
  1103.     (defrule
  1104.         (goal personality ALLY)
  1105.         (players-tribute any-human-neutral stone >= 500)
  1106.     =>
  1107.         (chat-to-player-using-id this-any-human-neutral 22064)
  1108.             ;"41 Thank thee for the stone! It is enough."
  1109.         (clear-tribute-memory this-any-human-neutral stone)
  1110.         (set-goal 38 YES)
  1111.         (disable-self)
  1112.     )
  1113.  
  1114.     (defrule
  1115.         (goal personality ALLY)
  1116.         (goal 36 YES)
  1117.         (players-tribute-memory any-human-neutral wood > 0)
  1118.     =>
  1119.         (chat-to-player-using-id this-any-human-neutral 22065)
  1120.             ;"41 Thou hast sent me sufficient wood!! Pray, send no more."
  1121.         (clear-tribute-memory this-any-human-neutral wood)
  1122.         (set-goal 39 YES)
  1123.         (disable-self)
  1124.     )
  1125.  
  1126.     (defrule
  1127.         (goal personality ALLY)
  1128.         (goal 37 YES)
  1129.         (players-tribute-memory any-human-neutral food > 0)
  1130.     =>
  1131.         (chat-to-player-using-id this-any-human-neutral 22066)
  1132.             ;"41 Thou hast sent me sufficient food!! Pray, send no more."
  1133.         (clear-tribute-memory this-any-human-neutral food)
  1134.     )
  1135.  
  1136.     (defrule
  1137.         (goal personality ALLY)
  1138.         (goal 38 YES)
  1139.         (players-tribute-memory any-human-neutral gold > 0)
  1140.     =>
  1141.         (chat-to-player-using-id this-any-human-neutral 22067)
  1142.             ;"41 Thou hast sent me sufficient gold!! Pray, send no more."
  1143.         (clear-tribute-memory this-any-human-neutral gold)
  1144.     )
  1145.  
  1146.     (defrule
  1147.         (goal personality ALLY)
  1148.         (goal 39 YES)
  1149.         (players-tribute-memory any-human-neutral stone > 0)
  1150.     =>
  1151.         (chat-to-player-using-id this-any-human-neutral 22068)
  1152.             ;"41 Thou hast sent me sufficient stone!! Pray, send no more."
  1153.         (clear-tribute-memory this-any-human-neutral stone)
  1154.     )
  1155.  
  1156.     (defrule
  1157.         (goal personality ALLY)
  1158.         (players-tribute any-human-neutral wood >= 500)
  1159.         (players-tribute any-human-neutral food >= 500)
  1160.         (players-tribute any-human-neutral gold >= 500)
  1161.         (players-tribute any-human-neutral stone >= 500)
  1162.         (stance-toward any-human neutral)
  1163.     =>
  1164.         (chat-to-player-using-id this-any-human 22016)
  1165.         (chat-to-player-using-id this-any-human 22003)
  1166.             ;"39 The goods we have obtained from you are glorious!"
  1167.             ;"Let us be friends henceforth!"
  1168.         (set-stance this-any-human ally)
  1169.         (set-stance every-computer enemy)
  1170.         (set-goal personality NO)
  1171.         (disable-self)
  1172.     )
  1173.  
  1174. ;*************************************************
  1175. ;MODERATE DIFFICULTY
  1176.     (defrule
  1177.         (goal personality ALLY)
  1178.         (game-time > 4800)
  1179.         (stance-toward any-human neutral)
  1180.         (difficulty == moderate)
  1181.         (or
  1182.             (or
  1183.                 (goal 36 NO)
  1184.                 (goal 37 NO)
  1185.             )
  1186.             (or
  1187.                 (goal 38 NO)
  1188.                 (goal 39 NO)
  1189.             )
  1190.         )
  1191.     =>
  1192.         (chat-to-player-using-id this-any-human 22069)
  1193.         (chat-to-player-using-id this-any-human 22070)
  1194.             ;"40 I have waited far too long for the promised tribute!"
  1195.             ;"Thou art exceedingly lax in fulfilling my requests."
  1196.     )
  1197.  
  1198.     (defrule
  1199.         (goal personality ALLY)
  1200.         (game-time > 4800)
  1201.         (stance-toward any-human neutral)
  1202.         (difficulty == moderate)
  1203.         (or
  1204.             (or
  1205.                 (goal 36 NO)
  1206.                 (goal 37 NO)
  1207.             )
  1208.             (or
  1209.                 (goal 38 NO)
  1210.                 (goal 39 NO)
  1211.             )
  1212.         )
  1213.     =>
  1214.         (set-stance this-any-human enemy)
  1215.         (set-stance every-computer ally)
  1216.         (set-goal personality 10)
  1217.     )
  1218.  
  1219. ;*************************************************
  1220. ;HARD+ DIFFICULTY
  1221.     (defrule
  1222.         (goal personality ALLY)
  1223.         (game-time > 3600)
  1224.         (stance-toward any-human neutral)
  1225.         (difficulty <= hard)
  1226.         (or
  1227.             (or
  1228.                 (goal 36 NO)
  1229.                 (goal 37 NO)
  1230.             )
  1231.             (or
  1232.                 (goal 38 NO)
  1233.                 (goal 39 NO)
  1234.             )
  1235.         )
  1236.     =>
  1237.         (chat-to-player-using-id this-any-human 22069)
  1238.         (chat-to-player-using-id this-any-human 22070)
  1239.             ;"40 I have waited far too long for the promised tribute!"
  1240.             ;"Thou art exceedingly lax in fulfilling my requests."
  1241.     )
  1242.  
  1243.     (defrule
  1244.         (goal personality ALLY)
  1245.         (game-time > 3600)
  1246.         (stance-toward any-human neutral)
  1247.         (difficulty <= hard)
  1248.         (or
  1249.             (or
  1250.                 (goal 36 NO)
  1251.                 (goal 37 NO)
  1252.             )
  1253.             (or
  1254.                 (goal 38 NO)
  1255.                 (goal 39 NO)
  1256.             )
  1257.         )
  1258.     =>
  1259.         (set-stance this-any-human enemy)
  1260.         (set-stance every-computer ally)
  1261.         (set-goal personality 10)
  1262.     )
  1263.  
  1264. ;*************************************************
  1265. #end-if
  1266. #end-if
  1267. #end-if
  1268.  
  1269.  
  1270.